// 所有模块都通过 define 来定义
define(function (require, exports, module) {
    $.ajax({
        url: "/app/member/info.html",
        type: "get",
        dataType: "json",
        success: function (data) {        	
            var tpl = require('/mobile/tpl/member/info.tpl');//载入tpl模板
            var template = Handlebars.compile(tpl);
            var html = template(data);
            $("#info").html(html);
        }
    });
    $('#logout').one('click', function (element) {
    	$.post("/app/user/logout.html",
                function (data) {
                    if (data.result) {
                        layer.alert("登出成功,3秒后跳转到登陆页",function(index){
                        	 window.location.href = "/mobile/user/login.html";
            			});
                        setTimeout(function(){
                            window.location.href = "/mobile/user/login.html";
                        },3000);

                    }
                }
        );
    });

    

});